<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>ChangeJsp.jsp</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
     <style>
        font{
           color:red;
           font-size:10px;
         
        }
     
     
     </style>
     
  
  </head>
  
  <body>
    <%String name=request.getParameter("name");  
      byte[] temp=name.getBytes("ISO-8859-1"); 
      name=new String(temp,"utf-8");%>
     <h1>更新数据</h1>
     <form action="servlet/TestServlet">
     <table>
          <tr><td></td><td><input type="hidden" value="update" name="method"/></td></tr>
          <tr><td></td><td><input type="hidden" value="<%=name%>" name="oldname"/></td></tr>
          <tr><td>name:</td><td><input type="text" value="<%=name%>" name="name"/></td><td><font>${requestScope.hasName?"*更改的用户已存在":""}</font></td></tr>
          <tr><td>passwd:</td><td><input type="text" value="${param.passwd}" name="passwd"/></td></tr>
          <tr><td>age:</td><td><input type="text" value="${param.age}" name="age"/></td></tr>
          <tr><td>telnum:</td><td><input type="text" value="${param.telnum}" name="telnum"/></td></tr>
          <tr>
              <td>sex:</td>
              <td><select name="sex">
                    <option value="男">男</option>
                    <option value="女">女</option>
                   </select></td>
          </tr>
          
     </table>
         <input type="submit" value="更改"/>
         <input type="reset" value="重置"/>
     
     </form>
  </body>
</html>
